use napi_derive_ohos::napi;
use sevenz_rust2::ArchiveEntry;

#[napi]
pub struct FileInfo {
    pub name: String,
    pub size: i32,
}

impl FileInfo {
    pub fn new(entry: &ArchiveEntry) -> Self {
        FileInfo {
            size: entry.size as i32,
            name: entry.name().to_string(),
        }
    }
}
